<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="app" id="app" name="demo">
        sadsa
    </div>

    <input type="text" value="ssss">

    <script>
        var app=document.getElementById('app')
        var app1=document.getElementsByClassName('app')[0]
        var app2=document.getElementsByName('demo')[0]
        var app3=document.getElementsByTagName('div')[0]

        app2.style.color='red'


</script>
</body>
</html>